package com.iplay.dahua.chapter2.decorator;

/**
 * @author dangwu
 * @since 2021/7/27 1:09 下午
 */
public class DecoratorTest {
    public static void main(String[] args) {
        ConcreteComponent c = new ConcreteComponent();
        ConcreteDecoratorA d1 = new ConcreteDecoratorA();
        ConcreteDecoratorB d2 = new ConcreteDecoratorB();

        d1.setComponent(c);
        d2.setComponent(d1);
        d2.operation();
    }
}
